import axios from 'axios'

// 后端支付下单接口（按你的要求更换为该地址）
const ALIPAY_ORDER_API = 'http://172.27.2.110/order/alipay'

/**
 * 创建支付宝订单，返回跳转地址
 */
export async function createAlipayOrder({ orderNo, totalPrice, subject }) {
  const payload = { orderNo, totalPrice, subject }
  const res = await axios.post(ALIPAY_ORDER_API, payload)
  return res?.data
}

export default { createAlipayOrder }


